Skip to content

Automate version stabilization: dynamically compute package versions for Helix testing#15681

Draft
joperezr wants to merge 1 commit intomicrosoft:mainfrom
joperezr:automate-helix-versions
Draft

Automate version stabilization: dynamically compute package versions for Helix testing#15681
joperezr wants to merge 1 commit intomicrosoft:mainfrom
joperezr:automate-helix-versions

Conversation

@joperezr
Copy link
Copy Markdown
Member

Description

Automates version stabilization by dynamically computing package versions instead of hardcoding them during release stabilization.

Problem: When stabilizing builds (StabilizePackageVersion=true), we had to manually hardcode versions in Directory.Packages.Helix.props (~80 package entries), hardcode the SDK version in Aspire.RepoTesting.targets, and remove PR version suffixes from CI — a fragile, error-prone process repeated every release.

Solution: Added a ReturnPackageVersion MSBuild target to src/Directory.Build.targets that returns each project's computed PackageId + PackageVersion (respecting SuppressFinalPackageVersion, StabilizePackageVersion, etc.). Extended _GeneratePackagesVersionsProps in Aspire.RepoTesting.targets to call this target on all packable src/ projects and write per-package versions into the generated Directory.Packages.Versions.props. Simplified Directory.Packages.Helix.props from ~86 lines of hardcoded versions to a ~15-line shell that imports the generated file.

Key changes:

  • src/Directory.Build.targets — Added ReturnPackageVersion target
  • tests/Shared/RepoTesting/Aspire.RepoTesting.targets — Extended version generation to include Aspire packages; SDK imports now use $(AspireAppHostSdkVersion) from the generated file
  • tests/Shared/RepoTesting/Directory.Packages.Helix.props — Replaced hardcoded versions with minimal shell

Verified: Stabilized builds correctly produce mixed versions — regular packages get 13.3.0 while SuppressFinalPackageVersion packages (Docker, Keycloak, Milvus, etc.) retain preview versions.

Fixes #15335

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15681

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15681"

@joperezr
Copy link
Copy Markdown
Member Author

@radical I'm running a couple of internal builds with Helix test runs to validate that these changes work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate version stabilization: dynamically compute package versions instead of hardcoding

1 participant